This function will clear the (previously created) ds_map of all key/value pairs, but it will not delete the ds_map itself from memory. For that you should use the function ds_map_destroy.
ds_map_clear(id);
参数 | 描述 |
---|---|
id | 要清除的数据结构的id。 |
N/A(无返回值)
if global.new_game
{
ds_map_clear(inventory);
;
The above function will check a global variable to see if it is true and, if it is, then the ds_map indexed in the instance variable "inventory" will be cleared of all key/value pairs (but it is not destroyed).